<template>
  <div class="content-box" :style="{ width, height }">
    <div class="title" v-if="showTitle">
      <slot name="title"></slot>
    </div>
    <div>
      <slot name="content"></slot>
    </div>
  </div>
</template>

<script setup>
  defineProps({
    width: {
      type: String,
      default: '0.9rem'
    },
    height: {
      type: String,
      default: '0.9rem'
    },
    showTitle: {
      type: Boolean,
      default: true
    }
  })
</script>

<style scoped>
  .content-box {
    border-radius: 4px;
    background-color: white;
    box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3);
  }

  .title {
    width: 100%;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    background-color: #ECF5FF;
  }
</style>
